#include "quadruple.hpp"
#include "cars.hpp"
#include "debug.hpp"
#include "queue.hpp"
#include "crossroad.hpp"
#include <iostream>
#include <bitset>

using namespace jam;

typedef quadruple<id_type_cons<double>::cons> num_quad;

mutex::mutex_quad_t mutex_quad;

void * logic(void *) {
  std::cout << "Running" << std::endl;
  return nullptr;
}

template <direction_t dir>
struct tpl {
  static void function() {
    std::cout << "Funtion: " << to_string(dir) << std::endl;
  }
};

int main() {
  num_quad::type quad;
  std::cout << std::boolalpha;
  QUAD_FIELD(num_quad, quad, South) = 42;
  EVAL(sizeof(Car<East, nullptr>));
  EVAL(sizeof(num_quad::type));
  EVAL(sizeof(std::bitset<4>));
  std::cout << QUAD_FIELD(num_quad, quad, South) << std::endl;
  typedef Queue<East, logic> queue_t;
  queue_t queue;
  queue.add_car(42);
  queue.emit();
  iterate_clockwise<East, tpl>();
  return 0;
}